#ifndef _BEM_UTIL_H_
#define _BEM_UTIL_H_

#include <mat.h>
#include <vec.h>

Mat33d tensorVectorDot(double A[3][3][3], Vec3d v);
Mat33d tensorVectorContraction(double A[3][3][3], Vec3d v);
Mat33d evaluateGradientQuadraturePoint(Vec3d p, Vec3d q, Vec3d qn);
Mat33d evaluateQuadraturePoint(Vec3d p, Vec3d q);
double* tensorProductGradient(double s, Vec3d ds, Mat33d A, double dA[3][3][3]);
int getIndex(int i, int j, int k);
int getTensorArrayIndex(int i, int j, int k);
double* getDrM(Vec3d r, double rn, Mat33d M);
double* getDrI(Vec3d r, double rn, Mat33d I);
double* getKernelGradient(Vec3d p, Vec3d q);

#endif
